<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>{{ cont[0].wid }}</p>
<input type="file"  multiple id="upstart">
<script>
    document.getElementById("upstart").onchange=(event)=>{
        const files=event.target.files;
        let formData = new FormData()
        // 遍历文件
        for (let i = 0; i <files.length; i++) {
            let file = files[i];
            formData.append('file'+ i, file)
        }
        // formData.append('file', files)
        fetch(`http://127.0.0.1:8006/upload`,{
            method :"POST",
            body: formData,
        })
        event.target.value=""

    }

</script>
</body>
</html>